<b class="xtop2"><b class="xb12"></b><b class="xb22"></b><b class="xb32"></b><b class="xb42"></b></b>

<div class="box_utama">
    <div class="box_cart">
            <img class="icon_judul" src="images/icon_judul.png" alt="" title="" />
            <div class="judul_cart"><b><?php echo $judul ?></b></div>
            <div class="isi_pembukaan">
                    <p>Berikut ini daftar produk yang Anda masukkan ke keranjang belanja. Anda dapat mengubah jumlah yang dipesan dengan mengedit pada kolom jumlah.</p>
            </div>
    </div>

    <div class="box_table_cart">
        <?php echo form_open('keranjang_belanja/update'); ?>

        <table class="cart_table">

            <tr class="cart_title">
                <th>Produk</th>
                <th style="text-align:right">Harga</th>
                <th>Jumlah</th>
                <th style="text-align:right">Subtotal</th>
            </tr>

            <?php $i = 1; ?>

            <?php foreach ($this->cart->contents() as $items): ?>

            <?php echo form_hidden($i . '[rowid]', $items['rowid']); ?>

            <tr>
                <td>
                    <?php echo img(array('src' => "foto_produk/{$items['pic']}", 'width' => '60', 'height' => '50', 'border' => '0', 'class' => 'cart_thumb')) ?>
                    <br/>
                    <strong>
                        <?php echo $items['name'] ?>
                    </strong>
                 </td>
                <td style="text-align:right">Rp <?php echo $this->cart->format_number($items['price']); ?></td>
                <td class="tombol">
                    <?php echo form_input(array('name' => $i . '[qty]', 'value' => $items['qty'], 'maxlength' => '3', 'size' => '2')); ?>
                    
                    <?php echo anchor('keranjang_belanja/hapus/'.$items['rowid'], img(array('src' => "images/hapus_cart.png", 'title' => 'Hapus', 'width' => '22', 'height' => '22', 'border' => '0', 'onclick' => "if(!confirm('Yakin menghapus?')) return false;"))); ?>
                </td>
                <td style="text-align:right">Rp <?php echo $this->cart->format_number($items['subtotal']); ?></td>
            </tr>

            <?php $i++; ?>

            <?php endforeach; ?>

            <?php if($this->cart->total_items() <= 0) : ?>

            <tr>
                <td colspan="4"><strong>Keranjang belanja masih kosong</strong></td>
            </tr>

            <?php else : ?>

            <tr>
                <td colspan="2"><?php echo form_submit('update', "Update")?></td>
                <td class="right"><strong>Total</strong></td>
                <td class="right" style="text-align:right"><strong>Rp <?php echo $this->cart->format_number($this->cart->total()); ?></strong></td>
            </tr>

            <?php endif; ?>

        </table>

        <?php echo form_close(); ?>

        <br/>

        <table class="cart_table">
            <tr>
                <td><?php echo anchor('produk', '&laquo; Lanjutkan belanja', array('style' => 'font-size: 15px; font-weight: bold; color:#990000')); ?></td>
                <td style="text-align: right"><?php echo anchor('checkout', 'Checkout &raquo;', array('style' => 'font-size: 15px; font-weight: bold; color:#990000')); ?></td>
            </tr>
        </table>
    </div>
    <div class="clear"></div>

</div>

<b class="xbottom2"><b class="xb42"></b><b class="xb32"></b><b class="xb22"></b><b class="xb12"></b></b>
